#! /usr/bin/env bash

# The semantic of md5sum differs in some subtle way. Darwin doesn't support
# /dev/stdin, FreeBSD doesn't support "-". Linux supports both.

case "$(uname)" in
  (Darwin) exec md5sum -c <(echo "$1  -") 2>&1 ;;
  (*) exec md5sum -c <(echo "$1  /dev/stdin") 2>&1 ;;
esac
